package course6;

public class SiSheWuRu {
    public static void main(String[] args) {
        double a=20.16;
        int b=(int)a;
        System.out.println("b的值："+b);
        System.out.println("a的值："+a);
        double c=0;
        c=a-b;
        if(c>=0.5) {
            b = b + 1;
            System.out.println("a四舍五入后b的值" + b);
        }
        else{
            System.out.println("a四舍五入b的值"+b);
        }
    }
}
